<template>
  <div class="about">
       <Header title="关于" background="#fff"/>
      <p class="tit">某某数字藏品</p>
      <div class="comp p8" @click="show=true">
          分享某某数字藏品
        <van-icon name="arrow" /> 
      </div>
        <van-action-sheet class="fanModel" v-model="show" :actions="actions" cancel-text="取消" round @cancel="toCancel" @select="onSelect" />

        <van-overlay :show="showModel" @click="showModel = false" class="showModel">
        <div class="wrapper" @click.stop>
          <div class="block">
            <van-image :src="require('../../assets/img/info.png')" />
            <div class="mdDesc">
              <div class="name">绶带琼枝明黄折扇</div>
              <p>发现非凡的数字藏品，就在某某数字藏品</p>
              <div class="ewm"></div>
            </div>
            <van-button class="save" block type="info" @click="save">保存相册</van-button>
            <div class="close" @click="showModel = false">
              <van-icon name="cross" />
            </div>
          </div>
        </div>
      </van-overlay>
  </div>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'
export default {
  name: 'about',
  computed: { ...mapGetters({ pageData: 'pageData'}) },
  data () {
    return {
      show: false,
      showModel: false,
      actions: [
        {
          name: '生成海报',type: 1
        },
        {
          name: '分享好友',type: 2
        },
    ]
    }
  },
  methods: {
    save() {
      this.showModel = false
    },
    goPersonal() {
      this.$router.push({name: 'personal'})
    },
    onSelect(item){
      console.log(item)
      this.show = false
      if(item.type==1) {
        this.showModel = true
      }
    },
    toCancel(){
      console.log('点击了取消');
    }
  },
  mounted() {
    
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scope>
.about {
  // padding-top: 50px;
  padding: 50px 10px;
  box-sizing: border-box;
  .van-cell-group {
    .van-cell {
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #333333;
    }
  }
  .tit {
    font-size: 24px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #333333;
    line-height: 220px;
    text-align: center;
  }
    .comp {
        height: 54px;
        line-height: 54px;
        font-size: 15px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #333333;
        background: #FFFFFF;
        box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        padding-left: 16px;
        box-sizing: border-box;
        .van-icon {
          float: right;
          height: 54px;
          line-height: 54px;
          color: #666666;
        }
      }
  .fanModel.van-popup--bottom.van-popup--round {
      border-radius: 6px 6px 0 0;
  }
  .fanModel {
    .van-action-sheet__item,.van-action-sheet__cancel {
      font-size: 15px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #000000;
    }
    .van-action-sheet__content .van-action-sheet__item:nth-child(1) {
      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
  }

  
.showModel {
  z-index: 999;
  .wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  .block {
    position: relative;
    width: 288px;
    height: 360px;
    background-color: #fff;
    border-radius: 10px;
    box-sizing: border-box;
    .close {
      width: 50px;
      height: 50px;
      position: absolute;
      top: -50px;
      right: 0;
      .van-icon {
        color: #fff;
        font-size: 20px;
        margin-top: 16px;
        margin-left: 22px;
      }
    }
    .van-image {
      width: 100%;
      height: 280px;
      border-radius: 10px 10px 0 0;
      overflow: hidden;
    }
    .save.van-button--info {
      width: 200px;
      height: 38px;
      bottom: -70px;
      left: 50%;
      margin-left: -100px;
      position: absolute;
      background: rgba(0, 0, 0, 0);
      border-radius: 20px;
      border: 1px solid #FFFFFF;
    }
    .mdDesc {
        height: 70px;
        position: relative;
        padding: 0 8px;
        box-sizing: border-box;
        .name {
        display: block;
        line-height: 1;
        padding-top: 16px;
        padding-bottom: 12px;
        font-size: 15px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 500;
        color: #333333;
      }
      p {
        font-size: 11px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #999999;
        line-height: 18px;
      }
      .ewm {
        position: absolute;
        top: 0;
        right: 4px;
        width: 70px;
        height: 70px;
        background: #958CE7;
      }
    }
  }
}
}
</style>
